home *** CD-ROM | disk | FTP | other *** search
/ Winzipper / Winzipper_ISO.iso / nt4.0 server / OEMNADNM.IN_ / oemnadnm.inf
INI File  |  1996-07-12  |  28KB  |  710 lines

  1. [Identification]
  2.     OptionType = NetAdapter
  3. [PlatformsSupported]
  4.     MCA
  5. [Options]
  6.     NE2000MCA
  7. [FileConstants]
  8. UtilityInf      = "UTILITY.INF"
  9. subroutineinf   = "SUBROUTN.INF"
  10. SoftwareType    = "driver"
  11. Exit_Code       = 0
  12. NetEventDLL     = "%SystemRoot%\System32\netevent.dll"
  13. IoLogMsgDLL     = "%SystemRoot%\System32\IoLogMsg.dll"
  14. NE2000MCA_1BYTE    = { 176, 31, 84 }
  15. NE2000MCA_2BYTE    = { 103, 97, 113 }
  16. NETCARD_ID      = { 26544, 24863, 29012 }
  17. IOBaseAddrHexList = { "0x300","0x320","0x340","0x360" }
  18. IOBaseAddrDecList = { 768, 800, 832, 864 }
  19. IRQList = {2,3,4,5,6,7,8,10,11,12,13,14,15}
  20. Manufacturer    = "Microsoft"
  21. ProductMajorVersion     = "4"
  22. ProductMinorVersion     = "0"
  23. ProductVersion  = $(ProductMajorVersion)"."$(ProductMinorVersion)
  24. ProductSoftwareName     = "NE2000MCA"
  25. ProductSoftwareImagePath = "\SystemRoot\system32\drivers\ne2000.sys"
  26. NetRuleSoftwareType     = "ne2000MCASys ndisDriver ne2000MCADriver"
  27. NetRuleSoftwareUse      = $(SoftwareType)
  28. NetRuleSoftwareBindForm = """NE2000MCASys"" yes no container"
  29. NetRuleSoftwareClass    = {"ne2000MCADriver basic"}
  30. NetRuleSoftwareBindable = {"ne2000MCADriver ne2000MCAAdapter non exclusive 100"}
  31. ProductHardwareName     = "NE2000MCA"
  32. NetRuleHardwareType     = "ne2000MCA ne2000MCAAdapter"
  33. NetRuleHardwareBindForm = " yes yes container"
  34. NetRuleHardwareClass    = {"ne2000MCAAdapter basic"}
  35. ProductOpSupport     = 134 
  36. ProductOtherOpSupport     = 132 
  37. ProductKeyName  = $(!NTN_SoftwareBase)"\"$(Manufacturer)"\"$(ProductSoftwareName)"\CurrentVersion"
  38. ParamKeyName    = $(!NTN_ServiceBase)"\"$(ProductHardwareName)"\Parameters"
  39. [GeneralConstants]
  40. from      = ""
  41. to        = ""
  42. ExitCodeOk     = 0
  43. ExitCodeCancel = 1
  44. ExitCodeFatal  = 2
  45. KeyNull         = ""
  46. MAXIMUM_ALLOWED   = 33554432
  47. RegistryErrorIndex = NO_ERROR
  48. KeyProduct      = ""
  49. KeyParameters   = ""
  50. TRUE            = 1
  51. FALSE           = 0
  52. NoTitle            = 0
  53. ExitState   = "Active"
  54. OldVersionExisted = $(FALSE)
  55. DriverPath      = $(!STF_NTPATH)\drivers
  56. [date]
  57.     Now = {} ? $(!LIBHANDLE) GetSystemDate
  58. [Identify]
  59.     read-syms Identification
  60.     set Status     = STATUS_SUCCESSFUL
  61.     set Identifier = $(OptionType)
  62.     set Media      = #("Source Media Descriptions", 1, 1)
  63.     Return $(Status) $(Identifier) $(Media)
  64. [ReturnOptions]
  65.     set Status        = STATUS_FAILED
  66.     set OptionList     = {}
  67.     set OptionTextList = {}
  68.     set LanguageList = ^(LanguagesSupported, 1)
  69.     Ifcontains(i) $($0) in $(LanguageList)
  70.         ifstr(i) $($1) == ""
  71.            goto returnoptions
  72.         endif
  73.         set PlatformList = ^(PlatformsSupported, 1)
  74.         Ifcontains(i) $($1) in $(PlatformList)
  75.            goto returnoptions
  76.         else
  77.            set Status = STATUS_NOTSUPPORTED
  78.            goto finish_ReturnOptions
  79.         endif
  80.     else
  81.         set Status = STATUS_NOLANGUAGE
  82.         goto finish_ReturnOptions
  83.     endif
  84. returnoptions = +
  85.     set OptionList     = ^(Options, 1)
  86.     set OptionTextList = ^(OptionsText$($0), 1)
  87.     set Status         = STATUS_SUCCESSFUL
  88. finish_ReturnOptions = +
  89.     Return $(Status) $(OptionList) $(OptionTextList)
  90. [InstallOption]
  91.     set Option   = $($1)
  92.     set SrcDir   = $($2)
  93.     set AddCopy  = $($3)
  94.     set DoCopy   = $($4)
  95.     set DoConfig = $($5)
  96.     set LanguageList = ^(LanguagesSupported, 1)
  97.     Ifcontains(i) $($0) NOT-IN $(LanguageList)
  98.         Return STATUS_NOLANGUAGE
  99.     endif
  100.     Debug-Output "oenmadnm.INF: STF_CWDIR is: "$(!STF_CWDIR)
  101.     Debug-Output "oenmadnm.INF: STF_LANGUAGE is: "$(!STF_LANGUAGE)
  102.     set-subst LF = "\n"
  103.     read-syms GeneralConstants
  104.     read-syms FileConstants
  105.     read-syms DialogConstants$(!STF_LANGUAGE)
  106.     read-syms FileConstants$(!STF_LANGUAGE)
  107.     detect date
  108.     set-title  $(FunctionTitle)
  109.     set to   = Begin
  110.     set from = Begin
  111.     set CommonStatus = STATUS_SUCCESSFUL
  112.     EndWait
  113. Begin = +
  114.     Ifstr(i) $(!NTN_InstallMode) == deinstall
  115.         set StartLabel = removeadapter
  116.     else-Ifstr(i) $(!NTN_InstallMode) == Update
  117.         set StartLabel = UpgradeSoftware
  118.     else-Ifstr(i) $(!NTN_InstallMode) == bind
  119.         set StartLabel = bindingadapter
  120.     else-Ifstr(i) $(!NTN_InstallMode) == configure
  121.         set StartLabel = configureadapter
  122.     else
  123.         set StartLabel = installadapter
  124.         set OEM_ABANDON_OPTIONS = {}
  125.         set OEM_ABANDON_SOFTWARE = FALSE
  126.         set OEM_ABANDON_ON = TRUE
  127.     endif
  128.     set from = $(fatal)
  129.     set to = $(fatal)
  130.     goto $(StartLabel)
  131. installadapter = +
  132.     OpenRegKey $(!REG_H_LOCAL) "" $(ProductKeyName) $(MAXIMUM_ALLOWED) KeyProduct
  133.     Ifstr $(KeyProduct) != $(KeyNull)
  134.         CloseRegKey $(KeyProduct)
  135.         ifstr(i) !(NTN_RegBase) == $(ProductKeyName)
  136.            Shell $(UtilityInf), VerExistedDlg, $(ProductSoftwareTitle),+
  137.                $(ProductVersion)
  138.            ifint $($ShellCode) != $(!SHELL_CODE_OK)
  139.                Debug-Output "ShellCode error: cannot get an error string."
  140.                goto ShellCodeError
  141.            endif
  142.            goto end
  143.         else
  144.            Shell $(UtilityInf), CardExistedDlg
  145.            ifint $($ShellCode) != $(!SHELL_CODE_OK)
  146.                Debug-Output "ShellCode error: cannot get an error string."
  147.                goto ShellCodeError
  148.            endif
  149.            ifstr(i) $($R1) != "OK"
  150.                Set CommonStatus = STATUS_USERCANCEL
  151.                goto end
  152.            endif
  153.            set OldVersionExisted = $(TRUE)
  154.         endif
  155.     endif
  156.     goto nextstep
  157. configureadapter = +
  158.     Ifstr(i) $(ProductKeyName) == $(!NTN_RegBase)
  159.         Debug-Output "Cannot configure the ne2000 driver software."
  160.         Shell $(UtilityInf),RegistryErrorString,CANNOT_CONFIGURE_SOFTWARE
  161.     else
  162.         goto configureadapter2
  163.     endif
  164.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  165.         Debug-Output "ShellCode error: cannot get an error string."
  166.         goto ShellCodeError
  167.     endif
  168.     set Error = $($R0)
  169.     set from = end
  170.     set to = end
  171.     goto nonfatalinfo
  172. configureadapter2 = +
  173.     OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_RegBase) $(MAXIMUM_ALLOWED) NetCardKey
  174.     ifstr(i) $(NetCardKey) == ""
  175.         set CommonStatus = STATUS_USERCANCEL
  176.         goto successful
  177.     endif
  178.     GetRegValue $(NetCardKey) "ServiceName" ServiceInfo
  179.     set ServiceName = *($(ServiceInfo),4)
  180.     CloseRegKey $(NetCardKey)
  181.     OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_ServiceBase)"\"$(ServiceName)"\Parameters" $(MAXIMUM_ALLOWED) ParamKey
  182.     ifstr(i) $(ParamKey) != ""
  183.         GetRegValue $(ParamKey),"McaPosId", McaPosIdInfo
  184.         ifint *($(McaPosIdInfo),4) != 24863
  185.             Shell $(UtilityInf),RegistryErrorString,CANNOT_CONFIGURE_HARDWARE
  186.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  187.                 Debug-Output "ShellCode error: cannot get an error string."
  188.                 goto ShellCodeError
  189.             endif
  190.             set Error = $($R0)
  191.             set from = end
  192.             set to = end
  193.             goto nonfatalinfo
  194.         endif
  195.         GetRegValue $(ParamKey),"InterruptNumber", InterruptNumberInfo
  196.         set IRQValue = *($(IRQList),~($(IRQList), *($(InterruptNumberInfo),4)))
  197.         GetRegValue $(ParamKey),"IOBaseAddress", IOBaseInfo
  198.         set IOBaseAddress = *($(IOBaseAddrHexList),~($(IOBaseAddrDecList), *($(IOBaseInfo),4)))
  199.         read-syms FileDependentDlg$(!STF_LANGUAGE)
  200.         ui start "Config"
  201.         ifstr(i) $(DLGEVENT) == "CONTINUE"
  202.             set IRQValue = $(Combo1Out)
  203.             set IOBaseAddress = $(Combo2Out)
  204.             set IOBaseAddrValue = *($(IOBaseAddrDecList), ~($(IOBaseAddrHexList),+
  205.                 $(IOBaseAddress)))
  206.             SetRegValue $(ParamKey) {InterruptNumber,$(NoTitle),$(!REG_VT_DWORD),$(IRQValue)}
  207.             SetRegValue $(ParamKey) {IOBaseAddress,$(NoTitle),$(!REG_VT_DWORD),$(IOBaseAddrValue)}
  208.             ui pop 1
  209.         else
  210.             set CommonStatus = STATUS_USERCANCEL
  211.             ui pop 1
  212.         endif
  213.         CloseRegKey $(ParamKey)
  214.     endif
  215.     goto successful
  216. nextstep = +
  217.     StartWait
  218. installproduct = +
  219.     set cardlist = {}
  220.     Shell $(UtilityInf), MCAFindBus, *($(NE2000MCA_1BYTE),1), *($(NE2000MCA_2BYTE),1)
  221.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  222.         goto ShellCodeError
  223.     endif
  224.     ifstr $($R0) != "NO_ERROR"
  225.         set Error = $($R0)
  226.         goto fatal
  227.     endif
  228.     ifstr(i) $($R1) != {}
  229.         set cardlist = $($R1)
  230.     endif
  231.     Shell $(UtilityInf), MCAFindBus, *($(NE2000MCA_1BYTE),2), *($(NE2000MCA_2BYTE),2)
  232.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  233.         goto ShellCodeError
  234.     endif
  235.     ifstr $($R0) != "NO_ERROR"
  236.         set Error = $($R0)
  237.         goto fatal
  238.     endif
  239.     ifstr(i) $($R1) != {}
  240.         ifstr(i) $(cardlist) != {}
  241.             set cardlist = >($(cardlist),$($R1))
  242.         else
  243.             set cardlist = $($R1)
  244.         endif
  245.     endif
  246.     Shell $(UtilityInf), MCAFindBus, *($(NE2000MCA_1BYTE),3), *($(NE2000MCA_2BYTE),3)
  247.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  248.         goto ShellCodeError
  249.     endif
  250.     ifstr $($R0) != "NO_ERROR"
  251.         set Error = $($R0)
  252.         goto fatal
  253.     endif
  254.     ifstr(i) $($R1) != {}
  255.         ifstr(i) $(cardlist) != {}
  256.             set cardlist = >($(cardlist),$($R1))
  257.         else
  258.             set cardlist = $($R1)
  259.         endif
  260.     endif
  261.     ifstr(i) $(cardlist) == {}
  262.         set Error = $(CANNOT_FIND_ANY_CARD)
  263.         set CommonStatus = STATUS_USERCANCEL
  264.         set from = "end"
  265.         goto nonfatal
  266.     endif
  267.     set AdapterList = $(cardlist)
  268.     ifint $(OldVersionExisted) == $(FALSE)
  269.         ifstr(i) $(!NTN_InstallMode) == "install"
  270.            Ifstr(i) $(DoCopy) == "YES"
  271.               Shell $(UtilityInf), DoAskSource, $(!STF_CWDDIR), $(SrcDir) YES
  272.               Ifint $($ShellCode) != $(!SHELL_CODE_OK)
  273.                   Goto ShellCodeError
  274.               Else-Ifstr(i) $($R0) == STATUS_FAILED
  275.                   Shell $(UtilityInf) RegistryErrorString "ASK_SOURCE_FAIL"
  276.                   ifint $($ShellCode) != $(!SHELL_CODE_OK)
  277.                       goto ShellCodeError
  278.                   endif
  279.                   set Error = $($R0)
  280.                   Goto fatal
  281.               Else-Ifstr(i) $($R0) == STATUS_USERCANCEL
  282.                   Goto successful
  283.               Endif
  284.               Set SrcDir = $($R1)
  285.            Endif
  286.            install "Install-Option"
  287.            ifstr(i) $(STF_INSTALL_OUTCOME) != STF_SUCCESS
  288.               Shell $(UtilityInf) RegistryErrorString "UNABLE_COPY_FILE"
  289.               ifint $($ShellCode) != $(!SHELL_CODE_OK)
  290.                   goto ShellCodeError
  291.               endif
  292.               set Error = $($R0)
  293.               goto fatal
  294.            endif
  295.         endif
  296.         Shell $(UtilityInf), AddSoftwareComponent, $(Manufacturer), +
  297.             $(ProductSoftwareName), +
  298.             $(ProductSoftwareName), +
  299.             $(ProductSoftwareTitle), $(STF_CONTEXTINFNAME), +
  300.             $(ProductSoftwareImagePath), "kernel", "NDIS", {}, "",+
  301.             $(NetEventDLL)
  302.         Set OEM_ABANDON_SOFTWARE = TRUE
  303.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  304.             goto ShellCodeError
  305.         endif
  306.         set RegistryErrorIndex = $($R0)
  307.         Ifstr(i) $(RegistryErrorIndex) != "NO_ERROR"
  308.             EndWait
  309.             CloseRegKey $($R1)
  310.             CloseRegKey $($R2)
  311.             CloseRegKey $($R3)
  312.             CloseRegKey $($R4)
  313.             CloseRegKey $($R5)
  314.             goto fatalregistry
  315.         endif
  316.         Set SoftProductKey      = $($R1)
  317.         Set SoftNetRuleKey      = $($R2)
  318.         Set SoftServiceKey      = $($R3)
  319.         Set SoftParameterKey    = $($R4)
  320.         Set SoftLinkageKey      = $($R5)
  321.         set NewValueList = {{SoftwareType,$(NoTitle),$(!REG_VT_SZ),$(SoftwareType)},+
  322.                            {MajorVersion,$(NoTitle),$(!REG_VT_DWORD),$(ProductMajorVersion)},+
  323.                            {MinorVersion,$(NoTitle),$(!REG_VT_DWORD),$(ProductMinorVersion)},+
  324.                            {Title,$(NoTitle),$(!REG_VT_SZ),$(ProductSoftwareTitle)},+
  325.                            {Description,$(NoTitle),$(!REG_VT_SZ),$(ProductSoftwareDescription)},+
  326.                            {ServiceName,$(NoTitle),$(!REG_VT_SZ),$(ProductSoftwareName)},+
  327.                            {InstallDate,$(NoTitle),$(!REG_VT_DWORD),*($(Now),1)}}
  328.         Shell  $(UtilityInf), AddValueList, $(SoftProductKey), $(NewValueList)
  329.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  330.             goto ShellCodeError
  331.         endif
  332.         set RegistryErrorIndex = $($R0)
  333.         Ifstr(i) $(RegistryErrorIndex) != "NO_ERROR"
  334.             EndWait
  335.             CloseRegKey $(SoftProductKey)
  336.             CloseRegKey $(SoftNetRuleKey)
  337.             CloseRegKey $(SoftServiceKey)
  338.             CloseRegKey $(SoftParameterKey)
  339.             CloseRegKey $(SoftLinkageKey)
  340.             goto fatalregistry
  341.         endif
  342.         set NewValueList = {{type,$(NoTitle),$(!REG_VT_SZ),$(NetRuleSoftwareType)},+
  343.                             {use,$(NoTitle),$(!REG_VT_SZ),$(NetRuleSoftwareUse)}, +
  344.                             {bindform,$(NoTitle),$(!REG_VT_SZ),$(NetRuleSoftwareBindForm)}, +
  345.                             {class,$(NoTitle),$(!REG_VT_MULTI_SZ),$(NetRuleSoftwareClass)}, +
  346.                             {bindable,$(NoTitle),$(!REG_VT_MULTI_SZ),$(NetRuleSoftwareBindable)}, +
  347.                             {InfOption,$(NoTitle),$(!REG_VT_SZ),$(Option)}}
  348.         Shell  $(UtilityInf), AddValueList, $(SoftNetRuleKey), $(NewValueList)
  349.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  350.             goto ShellCodeError
  351.         endif
  352.         set RegistryErrorIndex = $($R0)
  353.         CloseRegKey $(SoftProductKey)
  354.         CloseRegKey $(SoftNetRuleKey)
  355.         CloseRegKey $(SoftServiceKey)
  356.         CloseRegKey $(SoftParameterKey)
  357.         CloseRegKey $(SoftLinkageKey)
  358.         Ifstr(i) $(RegistryErrorIndex) != "NO_ERROR"
  359.             EndWait
  360.             goto fatalregistry
  361.         endif
  362.     endif
  363.     ForListDo $(AdapterList)
  364.         set BusNum = *($($),1)
  365.         set SlotNum = *($($),2)
  366.         set McaPosId = *($($),3)
  367.         Debug-Output $(BusNum)
  368.         Debug-Output $(SlotNum)
  369.         Shell $(UtilityInf), IsNetCardAlreadyInstalled, $(BusNum), +
  370.             $(SlotNum), $(ProductHardwareDescription), $(ProductHardwareName)
  371.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  372.             goto ShellCodeError
  373.         endif
  374.         ifstr $($R0) != "NO_ERROR"
  375.             set Error = $($R0)
  376.             goto fatal
  377.         endif
  378.         ifstr(i) $($R1) != "YES"
  379.                 Shell $(UtilityInf), AddHardwareComponent, $(ProductHardwareName),$(STF_CONTEXTINFNAME),$(ProductKeyName)
  380.                 ifint $($R4) != -1
  381.                     Set OEM_ABANDON_OPTIONS = >($(OEM_ABANDON_OPTIONS), $(!NTN_SoftwareBase)"\Microsoft\Windows NT\CurrentVersion\NetworkCards\"$($R4))
  382.                 endif
  383.                 ifint $($ShellCode) != $(!SHELL_CODE_OK)
  384.                     goto ShellCodeError
  385.                 endif
  386.                 set RegistryErrorIndex = $($R0)
  387.                 Ifstr(i) $(RegistryErrorIndex) != "NO_ERROR"
  388.                     EndWait
  389.                     CloseRegKey $($R1)
  390.                     CloseRegKey $($R2)
  391.                     CloseRegKey $($R3)
  392.                     goto fatalregistry
  393.                 endif
  394.                 Set HardNetCardKey      = $($R1)
  395.                 Set HardNetRuleKey      = $($R2)
  396.                 Set HardParameterKey    = $($R3)
  397.                 set AdapterNumber       = $($R4)
  398.                 ifint $(McaPosId) != 24863
  399.                     set OpSupport = $(ProductOtherOpSupport)
  400.                 else
  401.                     set OpSupport = $(ProductOpSupport)
  402.                 endif
  403.                 set NewValueList = {{Manufacturer,$(NoTitle),$(!REG_VT_SZ),$(Manufacturer)},+
  404.                                    {Title,$(NoTitle),$(!REG_VT_SZ),"["$($R4)"] "$(ProductHardwareTitle)},+
  405.                                    {Description,$(NoTitle),$(!REG_VT_SZ),$(ProductHardwareDescription)},+
  406.                                    {ProductName,$(NoTitle),$(!REG_VT_SZ),$(ProductHardwareName)},+
  407.                                    {ServiceName,$(NoTitle),$(!REG_VT_SZ),$($R5)},+
  408.                                    {OperationsSupport,$(NoTitle),$(!REG_VT_DWORD),$(OpSupport)},+
  409.                                    {InstallDate,$(NoTitle),$(!REG_VT_DWORD),*($(Now),1)}}
  410.                 Shell  $(UtilityInf), AddValueList, $(HardNetCardKey), $(NewValueList)
  411.                 ifint $($ShellCode) != $(!SHELL_CODE_OK)
  412.                     goto ShellCodeError
  413.                 endif
  414.                 set NewValueList = {{BusNumber,$(NoTitle),$(!REG_VT_DWORD),$(BusNum)},+
  415.                                 {BusType,$(NoTitle),$(!REG_VT_DWORD),3},+
  416.                                 {McaPosId,$(NoTitle),$(!REG_VT_DWORD),$(McaPosId)},+
  417.                                 {CardType,$(NoTitle),$(!REG_VT_DWORD),2},+
  418.                                 {MediaType,$(NoTitle),$(!REG_VT_DWORD),1},+
  419.                                 {SlotNumber,$(NoTitle),$(!REG_VT_DWORD),$(SlotNum)}}
  420.                 Shell  $(UtilityInf), AddValueList, $(HardParameterKey), $(NewValueList)
  421.                 ifint $($ShellCode) != $(!SHELL_CODE_OK)
  422.                     goto ShellCodeError
  423.                 endif
  424.                 ifint $(McaPosId) == 24863
  425.                     ifstr(i) $(!STF_GUI_UNATTENDED) == "YES"
  426.                         Shell $(UtilityInf),AddDefaultNetCardParameters,$(HardParameterKey)
  427.                     else
  428.                         GetRegValue $(HardParameterKey),"InterruptNumber", InterruptNumberInfo
  429.                         set IRQValue = *($(IRQList),~($(IRQList), *($(InterruptNumberInfo),4)))
  430.                         GetRegValue $(HardParameterKey),"IOBaseAddress", IOBaseInfo
  431.                         set IOBaseAddress = *($(IOBaseAddrHexList),~($(IOBaseAddrDecList), *($(IOBaseInfo),4)))
  432.                         read-syms FileDependentDlg$(!STF_LANGUAGE)
  433.                         ui start "Config"
  434.                         ifstr(i) $(DLGEVENT) == "CONTINUE"
  435.                             set IRQValue = $(Combo1Out)
  436.                             set IOBaseAddress = $(Combo2Out)
  437.                             set IOBaseAddrValue = *($(IOBaseAddrDecList), ~($(IOBaseAddrHexList),+
  438.                                 $(IOBaseAddress)))
  439.                             SetRegValue $(HardParameterKey) {InterruptNumber,$(NoTitle),$(!REG_VT_DWORD),$(IRQValue)}
  440.                             SetRegValue $(HardParameterKey) {IOBaseAddress,$(NoTitle),$(!REG_VT_DWORD),$(IOBaseAddrValue)}
  441.                             ui pop 1
  442.                         else
  443.                             ui pop 1
  444.                         endif
  445.                     endif
  446.                 endif
  447.                 set TempProdName = """"$(ProductHardwareName)$(AdapterNumber)""""
  448.                 set TempBindForm = $(TempProdName)$(NetRuleHardwareBindForm)
  449.                 set NewValueList = {{type,$(NoTitle),$(!REG_VT_SZ),$(NetRuleHardwareType)},+
  450.                                     {bindform,$(NoTitle),$(!REG_VT_SZ),$(TempBindForm)}, +
  451.                                     {class,$(NoTitle),$(!REG_VT_MULTI_SZ),$(NetRuleHardwareClass)}, +
  452.                                     {InfOption,$(NoTitle),$(!REG_VT_SZ),$(Option)}}
  453.                 Shell  $(UtilityInf), AddValueList, $(HardNetRuleKey), $(NewValueList)
  454.                 CloseRegKey $(HardNetCardKey)
  455.                 CloseRegKey $(HardNetRuleKey)
  456.                 CloseRegKey $(HardParameterKey)
  457.                 ifint $($ShellCode) != $(!SHELL_CODE_OK)
  458.                     goto ShellCodeError
  459.                 endif
  460.          endif
  461.     EndForListDo
  462.     goto writeparameters
  463. writeparameters = +
  464.     EndWait
  465.     goto successful
  466. bindingadapter =+
  467.     set Error = "Binding: Not Implmemented yet"
  468.     goto fatal
  469. removeadapter = +
  470.     Ifstr(i) $(ProductKeyName) == $(!NTN_RegBase)
  471.         Shell $(UtilityInf), RemoveSoftwareComponent, $(Manufacturer), +
  472.             $(ProductSoftwareName)
  473.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  474.             Debug-Output "ShellCode error"
  475.             goto ShellCodeError
  476.         endif
  477.         set RegistryErrorIndex = $($R0)
  478.         Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  479.             goto fatalregistry
  480.         endif
  481.     else
  482.         Shell $(UtilityInf), RemoveHardwareComponent, $(Manufacturer), +
  483.             $(ProductSoftwareName), $(!NTN_RegBase)
  484.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  485.             Debug-Output "ShellCode error"
  486.             goto ShellCodeError
  487.         endif
  488.         set RegistryErrorIndex = $($R0)
  489.         Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  490.             goto fatalregistry
  491.         endif
  492.     endif
  493.     goto end
  494. UpgradeSoftware = +
  495.     OpenRegKey $(!REG_H_LOCAL) "" $(ProductKeyName) $(MAXIMUM_ALLOWED) KeyProduct
  496.     Ifstr $(KeyProduct) != $(KeyNull)
  497.         install "Install-Update"
  498.         ifstr(i) $(STF_INSTALL_OUTCOME) != STF_SUCCESS
  499.             goto fatal
  500.         endif
  501.         SetRegValue $(KeyProduct) {MajorVersion,$(NoTitle),$(!REG_VT_SZ),$(ProductMajorVersion)}
  502.         SetRegValue $(KeyProduct) {MinorVersion,$(NoTitle),$(!REG_VT_SZ),$(ProductMinorVersion)}
  503.         CloseRegKey $(KeyProduct)
  504.     else
  505.         goto fatalregistry
  506.     endif
  507.     OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_ServiceBase)"\"$(ServiceName)"\Parameters" $(MAXIMUM_ALLOWED) ParamKey
  508.     ifstr(i) $(ParamKey) != ""
  509.         GetRegValue $(ParamKey),"McaPosId", McaPosIdInfo
  510.         ifint *($(McaPosIdInfo),4) != 24863
  511.             set OpSupport = $(ProductOtherOpSupport)
  512.         else
  513.             set OpSupport = $(ProductOpSupport)
  514.         Endif
  515.         CloseRegKey $(ParamKey)
  516.         set iSearch = 1
  517. nextnetcard = +
  518.         Shell $(UtilityInf), FindNextNetworkCard, $(ProductHardwareName), $(iSearch)
  519.         set KeyNetcard = $($R0)
  520.         set iSearch = $($R1)
  521.         Debug-Output "OemNadEp.Inf: FindNextNetworkCard "$(KeyNetcard)","$(iSearch)
  522.         Ifstr $(KeyNetcard) != $(KeyNull)
  523.             Debug-Output "OemNadEp.Inf: Setting OperationsSupport value"
  524.             SetRegValue $(KeyNetcard) {OperationsSupport,$(NoTitle),$(!REG_VT_DWORD),$(OpSupport)}
  525.             CloseRegKey $(KeyNetcard)
  526.             goto nextnetcard
  527.         Endif
  528.     Endif
  529.     goto end
  530. successful = +
  531.     goto end
  532. abandon = +
  533.     ForListDo $(OEM_ABANDON_OPTIONS)
  534.         Shell $(UtilityInf), RemoveHardwareComponent, $(Manufacturer), +
  535.             $(ProductSoftwareName), $($)
  536.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  537.             Debug-Output "ShellCode error"
  538.             goto ShellCodeError
  539.         endif
  540.         set RegistryErrorIndex = $($R0)
  541.         Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  542.             goto fatalregistry
  543.         endif
  544.     EndForListDo
  545.     Ifstr(i) $(OEM_ABANDON_SOFTWARE) == TRUE
  546.         Shell $(UtilityInf), RemoveSoftwareComponent, $(Manufacturer), +
  547.             $(ProductSoftwareName), FALSE
  548.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  549.             Debug-Output "ShellCode error"
  550.             goto ShellCodeError
  551.         endif
  552.         set RegistryErrorIndex = $($R0)
  553.         Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  554.             goto fatalregistry
  555.         endif
  556.     endif
  557.     goto end
  558. warning = +
  559.     Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), "WARNING", $(Error)
  560.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  561.         goto ShellCodeError
  562.     endif
  563.     ifstr(i) $($R1) == "OK"
  564.         goto $(to)
  565.     else-ifstr(i) $($R1) == "CANCEL"
  566.         goto $(from)
  567.     else
  568.         goto "end"
  569.     endif
  570. nonfatalinfo = +
  571.     Set CommonStatus = STATUS_USERCANCEL
  572.     Set Severity = STATUS
  573.     goto nonfatalmsg
  574. nonfatal = +
  575.     Set Severity = NONFATAL
  576.     goto nonfatalmsg
  577. nonfatalmsg = +
  578.     ifstr(i) $(Error) == ""
  579.         Set Severity = NONFATAL
  580.         Shell $(UtilityInf) RegistryErrorString "SETUP_FAIL"
  581.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  582.             goto ShellCodeError
  583.         endif
  584.         set Error = $($R0)
  585.     endif
  586.     Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), $(Severity), $(Error)
  587.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  588.         goto ShellCodeError
  589.     endif
  590.     ifstr(i) $($R1) == "OK"
  591.         goto $(from)
  592.     else
  593.         goto "end"
  594.     endif
  595. fatalregistry = +
  596.     Shell $(UtilityInf) RegistryErrorString $(RegistryErrorIndex)
  597.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  598.         goto ShellCodeError
  599.     endif
  600.     set Error = $($R0)
  601.     goto fatal
  602. fatal = +
  603.     ifstr(i) $(Error) == ""
  604.         Shell $(UtilityInf) RegistryErrorString "SETUP_FAIL"
  605.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  606.             goto ShellCodeError
  607.         endif
  608.         set Error = $($R0)
  609.     endif
  610.     Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), "FATAL", $(Error)
  611.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  612.         goto ShellCodeError
  613.     endif
  614.     goto setfailed
  615. ShellCodeError = +
  616.     set DlgType      = "MessageBox"
  617.     set STF_MB_TITLE = $(ShellCodeErrorTitle)
  618.     set STF_MB_TEXT  = $(ShellCodeErrorText)
  619.     set STF_MB_TYPE  = 1
  620.     set STF_MB_ICON  = 3
  621.     set STF_MB_DEF   = 1
  622.     ui start "Error Message"
  623.     goto setfailed
  624. setfailed = +
  625.     set CommonStatus = STATUS_FAILED
  626.     ifstr(i) $(OEM_ABANDON_ON) == TRUE
  627.         set OEM_ABANDON_ON = FALSE
  628.         goto abandon
  629.     endif
  630.     goto end
  631. end = +
  632.     goto term
  633. term = +
  634.     Return $(CommonStatus)
  635. [Install-Option]
  636.     set STF_VITAL = ""
  637.     ifstr(i) $(AddCopy) == "YES"
  638.         AddSectionFilesToCopyList Files-$(Option) $(SrcDir) $(!STF_WINDOWSSYSPATH)\drivers
  639.     endif
  640.     ifstr(i) $(DoCopy) == "YES"
  641.        set !STF_NCPA_FLUSH_COPYLIST = TRUE
  642.        CopyFilesInCopyList
  643.     endif
  644.     ifstr(i) $(DoConfig) == "YES"
  645.     endif
  646.     Exit
  647. [Install-Update]
  648.    set STF_VITAL        = ""
  649.    set STF_OVERWRITE    = "VERIFYSOURCEOLDER"
  650.    AddSectionFilesToCopyList Files-$(Option) $(SrcDir) $(!STF_WINDOWSSYSPATH)\drivers
  651.    exit
  652. [Source Media Descriptions]
  653.     1 = "Windows NT Server CD-ROM", TAGFILE = cdrom_s.40
  654. [Signature]
  655.     FileType = MICROSOFT_FILE
  656. [GetSignature]
  657.     read-syms Signature
  658.     return $(FileType)
  659. [ProductType]
  660. STF_PRODUCT  = LanmanNT
  661. STF_PLATFORM = I386
  662. [Files-Inf]
  663. 2,    oemsetup.inf,     SIZE=1000,    RENAME=$(!UG_Filename)
  664. [Files-NE2000MCA]
  665. 1,NE2000.SYS , SIZE=999
  666. [LanguagesSupported]
  667.     ENG
  668. [OptionsTextENG]
  669.     NE2000MCA     = "NE/2 and compatible MC Adapter"
  670. [FileConstantsENG]
  671. ProCaption   = "Windows NT Setup"
  672. ProCancel    = "Cancel"
  673. ProCancelMsg = "Windows NT Networking is not correctly installed.  "+
  674.                "Are you sure you want to cancel copying files?"
  675. ProCancelCap = "Network Setup Message"
  676. ProText1     = "Copying:"
  677. ProText2     = "To:"
  678. FunctionTitle   = "NE/2 and compatible MC Adapter Card Setup"
  679. ProductSoftwareDescription      = "NE/2 and compatible MC Adapter Driver"
  680. ProductHardwareDescription      = "NE/2 and compatible MC Adapter"
  681. CANNOT_FIND_ANY_CARD            = "Network card is not present in the system"
  682. ProductSoftwareTitle    = "NE/2 and compatible MC Adapter Driver"
  683. ProductHardwareTitle    = "NE/2 and compatible MC Adapter"
  684. ShellCodeErrorTitle     = "Error: "$(FunctionTitle)
  685. ShellCodeErrorText      = "Shell Code Error."
  686. [DialogConstantsENG]
  687. Help        = "&Help"
  688. Exit        = "Cancel"
  689. OK          = "OK"
  690. HelpContext = ""
  691. Continue    = "C&ontinue"
  692. Cancel      = "C&ancel"
  693. [FileDependentDlgENG]
  694. Label1 = "&IRQ Level:"
  695. Label2 = "I/O &Port Address:"
  696. DlgType = "RadioCombination"
  697. DlgTemplate = "NE2000"
  698. Caption = $(FunctionTitle)
  699. Combo1List = $(IRQList)
  700. Combo1Out  = $(IRQValue)
  701. Combo2List = $(IOBaseAddrHexList)
  702. Combo2Out  = $(IOBaseAddress)
  703. ComboListItemsIn  = {Combo1List, Combo2List}
  704. ComboListItemsOut = {Combo1Out, Combo2Out}
  705. EditTextIn = ""
  706. EditTextLim = ""
  707. CBOptionsGreyed = {}
  708. NotifyFields = {NO, NO}
  709. HelpContext = $(!IDH_DB_OEMNADN2_INS)
  710.